package Thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2023-04-03
 * Time: 15:59
 */
public class Thread27 {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(5);
        for (int i = 0; i < 1000; i++) {
            int n = i;
            pool.submit(() ->{
                System.out.println("hello " + n);
            });

        }
    }
}
